/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package divisionofintegersapp;
/**
 *
 * @author Novikov
 */
import java.util.*;

public class DivisionOfIntegersApp {
    /**
     * @param args the command line arguments
     */
    static Scanner reader= new Scanner(System.in);
    private static int Dividend;
    private static int Devisor;
    private static int Result;
    private static int Rest;
    
    public static void main(String[] args) {
        input();
        computing();
        printResult();
   }
    public static void input(){
        System.out.println("Input your dividend: ");
        Dividend = reader.nextInt();
        System.out.println("Input your divisor: ");
        Devisor = reader.nextInt();
        checInputZero();
    }
    private static void checInputZero() {
        while( Devisor == 0){
             System.out.println("Not correctly. Input your divisor: ");
             Devisor = reader.nextInt();
        }
    }
    public static void printResult(){
        System.out.println(Dividend + " | " +Devisor);
        System.out.println("     " +Result);
        System.out.println(" " +Rest);       
    }
    public static void computing(){
        Result = Dividend / Devisor;
        Rest = Dividend % Devisor;
    }
}
